import React, {useReducer} from 'react';
import {myReducer} from '@/store/reducer/homeReducer.js';

function Child2() {
  let [state, dispatch] = useReducer(myReducer, {count: 1});
  return (
    <div>
      <button onClick={() => dispatch({type: 'add'})}>+</button>
      {state.count}
      <button onClick={() => dispatch({type: 'sub'})}>-</button>
    </div>
  );
}


export default Child2;
